/*
 * LiveMediaPlayer.h
 *
 *  Created on: 2018年8月2日
 *      Author: zhengboyuan
 */

#ifndef LIVEMEDIAPLAYER_H_
#define LIVEMEDIAPLAYER_H_

#include "MediaStreamPlayer.h"

class LiveMediaPlayer: public MediaStreamPlayer
{
public:
	static int	MAX_DELAY_TIME;

public:
    LiveMediaPlayer();
    virtual ~LiveMediaPlayer();

    bool Open(nvs::NetVideoSystem* system, const char* devID);

    virtual bool CanSeek();

    virtual std::string GetUrl();

    virtual void EnableDrawTrack(bool enabled);

	virtual void inputFaceTrack(const char* devID, const char* text, int size);

protected:
	virtual void onOpen();

protected:
	static void decodeCallback(HANDLE handle, MDecode_Frame* frame, void* pUser);

	void onDecodeFrame(HANDLE handle, MDecode_Frame* frame);

	std::string makeFaceTrack(int width, int height, int64_t pts);

protected:
    std::string m_devID;
    bool    m_faceTrackEnabled;

	int		m_faceCount;

};

#endif /* LIVEMEDIAPLAYER_H_ */
